package com.ruoyi.car.api.factory;

import com.ruoyi.car.api.RemoteCarService;
import com.ruoyi.car.api.domain.CheCar;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * @ClassName RemoteCarFallbackFactory
 * @Description TODO
 * @Author 李政阳
 * @Date 2025年01月02日 19:29
 * @Version 1.0
 */
public class RemoteCarFallbackFactory implements FallbackFactory<RemoteCarService> {

    private static final Logger log = LoggerFactory.getLogger(RemoteCarFallbackFactory.class);
    @Override
    public RemoteCarService create(Throwable cause) {
        return new RemoteCarService() {
            @Override
            public CheCar getById(Long id, String source) {
                System.out.println("调用失败");
                return new CheCar();
            }
        };
    }
}
